package com.mccken.designpattern.adapter.adapter3;

/**
 * @program: mccken-collect
 * @description:
 * @author: mccken
 * @create: 2022-10-26 16:22
 **/
public class ObjectAdaptor implements ITarget {
	
	private Adaptee adaptee;
	
	public ObjectAdaptor(Adaptee adaptee) {
		this.adaptee = adaptee;        
	}

	@Override
	public void f1() {
		adaptee.fa(); //委托给adaptee
	}

	@Override
	public void f2() {
		// 重新实现 f2()
	}

	@Override
	public void fc() {
		adaptee.fc();
	}
}
